<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <!-- <meta http-equiv="X-UA-Compatible" content="IE=edge"> -->
    <meta name="viewport" content="width=device-width,initial-scale=1.0,user-scalable=0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no">
    <title>首页</title>
    <link rel="stylesheet" href="__MOBILE__/jscss/index.css">
    <link rel="stylesheet" href="__MOBILE__/jscss/css.css">
    <script type="text/javascript" src="__MOBILE__/jscss/w_rem.js" ></script>
    <script src="__MOBILE__/jscss/jquery.min.js"></script>
<script src="https://cdn.staticfile.org/axios/0.18.0/axios.min.js"></script></head>
<body style="background: #f8f8f8;">
    <form>
        <div class="index_top1">
            <div class="index_top1_title clear">
                <div class="index_top1_title_left clear">
                    <div class="index_top1_title_left1">01</div>
                    <div class="index_top1_title_left2">讲座日期</div>
                </div>
                <div class="index_top1_title_right clear">
                    <div class="index_top1_title_right1"><img src="__MOBILE__/img/a1.png" ><input type="date" class="time1"></div>
                    <div class="index_top1_title_right2"></div>
                </div>
            </div>
        </div>
        <div class="index_top1">
            <div class="index_top1_title clear">
                <div class="index_top2_title_left clear"><div class="index_top1_title_left1">02</div><div class="index_top1_title_left2">填写人姓名</div></div>
            </div>
            <div class="index_top2_input"><input type="text" placeholder="请输入填写人姓名"></div>
        </div>
        <div class="index_top1">
            <div class="index_top1_title clear">
                <div class="index_top2_title_left clear"><div class="index_top1_title_left1">03</div><div class="index_top1_title_left2">填写人电话号码</div></div>
            </div>
            <div class="index_top2_input"><input type="tel" placeholder="请输入您的电话号码" maxlength="11"></div>
        </div>
        <div class="index_top1">
            <div class="index_top1_title clear">
                <div class="index_top2_title_left clear"><div class="index_top1_title_left1">04</div><div class="index_top1_title_left2">火警电话是多少?</div></div>
            </div>
            <div class="index_top2_sel">
                <div class="index_top2_sel1 clear">
                    <div class="index_top2_sel_img"><img src="__MOBILE__/img/a2.png"><img src="__MOBILE__/img/a3.png"><input type="radio"></div>
                    <div class="index_top2_sel_text">119</div>
                </div>
                <div class="index_top2_sel1 clear">
                    <div class="index_top2_sel_img"><img src="__MOBILE__/img/a2.png"><img src="__MOBILE__/img/a3.png"><input type="radio"></div>
                    <div class="index_top2_sel_text">120</div>
                </div>
                <div class="index_top2_sel1 clear">
                    <div class="index_top2_sel_img"><img src="__MOBILE__/img/a2.png"><img src="__MOBILE__/img/a3.png"><input type="radio"></div>
                    <div class="index_top2_sel_text">110</div>
                </div>
                <div class="index_top2_sel1 clear">
                    <div class="index_top2_sel_img"><img src="__MOBILE__/img/a2.png"><img src="__MOBILE__/img/a3.png"><input type="radio"></div>
                    <div class="index_top2_sel_text">911</div>
                </div>
            </div>
        </div>
    </form>

    <div class="show1"></div>
    <div class="show2">
        <div class="show2_exit" style="visibility: hidden"><img src="__MOBILE__/img/a12.png" width="100%" height="100%"></div>
        <div class="show2_all">
            <div class="show2_title">请选择取货类型</div>
            <div class="show2_sel">
                <select name="distribution_type" id="" class="show2_sel_op">
                    <option value="1">快递邮寄</option>
<!--                    <option value="2">现场自提</option>-->
                </select>
                <div class="show2_sel_img"><img src="__MOBILE__/img/a13.png" width="100%" height="100%"/></div>
            </div>
            <div class="show2_btn" onclick="distribution_type()">点击确定</div>
        </div>

    </div>
    <a href=""><div class="show3">
        <div class="show3_img"><img src="__MOBILE__/img/a14.png" width="100%" height="100%"></div>
        <div class="show3_text">点击选择微信支付</div>

    </div></a>
    <div class="bottom clear">
        <div class="bottom_btn">立即结算</div>
        <div class="bottom_total clear"><div class="bottom_total1">合计</div><div class="bottom_total2">¥<span>0</span></div></div>
        <div class="bottom_num">共<span>0</span>件</div>
    </div>
    <div class="foot_back"></div>
{include file="public/foot"}
<script>
    $('.show2').show();
    $('.show1').show();
    function distribution_type(){
        var distribution_type = $('[name=distribution_type]').val();
        var order_number = "{:input('order_number')}";
    $.ajax({
        type: "POST", //用POST方式传输
        dataType: "json", //数据格式:JSON
        url: "{:url('distribution_type')}", //目标地址
        async: false,
        traditional :false,
        data:{distribution_type:distribution_type,order_number:order_number},
        success: function (ret) {
            console.log(ret);

            if(ret.code == 200){
                if(distribution_type == 1){ //已邮寄
                    window.location.href = "{:url('kuaidi')}?order_number="+order_number;
                }else{ //自提直接到订单
                    window.location.href = "{:url('order')}";
                }

            }else{
                layer.msg(ret.message);
            }
        }
    });
    }
</script>
</body>
</html>